<!DOCTYPE HTML>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <title>hello</title>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
    <link rel="stylesheet" type="text/css" media="all" href="../../webapp/static/css/list.css"
          th:href="@{/static/css/list.css}"/>
</head>
<body>

<div class="top "><h2 style="text-align: center"> 网上书店管理系统 </h2></div>
<div class="below ">
    <div class="b_left ">
        <ul class="s">
            <li><a href="#">书籍管理</a>
                <ul class="ss">
                    <li><a href="/listCategory">书单列表</a></li>
                    <li><a href="/editaddCategory">新增书籍</a></li>
                    <li><a href="/listPress">出版社信息</a></li>
                </ul>
            </li>
            <li><a href="/listUsers">客户管理</a></li>
            <li><a href="/listBuy">购买记录</a></li>
        </ul>
    </div>
    <div class="b_right ">
        <form action="/searchBook" method="post">
        书名: <input name="title"/>
        作者: <input name="author"/>
        &nbsp;&nbsp;<button type="submit">搜索</button>
        </form>
        <div class="bookList">
            <table align='center' border='1' cellspacing='0'>
                <tr>
                    <td>书号</td>
                    <td style="width: 400px">书名</td>
                    <td style="width: 200px">作者</td>
                    <td style="width: 100px">进价</td>
                    <td style="width: 100px">售价</td>
                    <td style="width: 150px">日期</td>
                    <td style="width: 100px">编辑</td>
                    <td style="width: 100px">删除</td>
                </tr>
                <tr th:each="c:${page.list}">
                    <td th:text="${c.b_id}"></td>
                    <td th:text="${c.title}"></td>
                    <td th:text="${c.author}"></td>
                    <td th:text="${c.price}"></td>
                    <td th:text="${c.sprice}"></td>
                    <td th:text="${c.date}"></td>
                    <td><a th:href="@{/editCategory(id=${c.b_id})}">编辑</a></td>
                    <td><a th:href="@{/deleteCategory(b_id=${c.b_id})}">删除</a></td>
                </tr>
            </table>
            <br/>
            <div>
                <a th:href="@{/listCategory(start=0)}">[首 页]</a>
                <a th:href="@{/listCategory(start=${page.pageNum-1})}">[上一页]</a>
                <a th:href="@{/listCategory(start=${page.pageNum+1})}">[下一页]</a>
                <a th:href="@{/listCategory(start=${page.pages})}">[末 页]</a>
            </div>
        </div>
    </div>
</div>
</body>
</html>